package com.studentcontrol;

import com.dao.StudentDao;

import javax.naming.NamingException;
import java.io.UnsupportedEncodingException;
import java.sql.SQLException;

/**
 * @author :wn
 * @program : 学生信息管理系统
 * @descript : 输入学生信息
 * @create :2020-11-13 22:48
 */

public class InputInformationAction {
    private String[] name;
    private String []age;
    private String[] sex;
    private String[]dept;

    public String[] getName() {
        return name;
    }

    public void setName(String[] name) {
        this.name = name;
    }

    public String[] getAge() {
        return age;
    }

    public void setAge(String[] age) {
        this.age = age;
    }

    public String[] getSex() {
        return sex;
    }

    public void setSex(String[] sex) {
        this.sex = sex;
    }

    public String[] getDept() {
        return dept;
    }

    public void setDept(String[] dept) {
        this.dept = dept;
    }
    public String inputInformation() throws UnsupportedEncodingException, SQLException, NamingException {
        for(int i=0;i<name.length;i++){
                boolean adder=new StudentDao().addWay(name[i],age[i],sex[i],dept[i]);
            }
        return "success";
    }
}
